package com.wyq.new_springboot.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wyq.new_springboot.entity.TUserRole;
import com.wyq.new_springboot.mapper.TUserRoleMapper;
import com.wyq.new_springboot.service.ITUserRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Mr Wei
 * @since 2021-04-14
 */
@Service
public class TUserRoleServiceImpl extends ServiceImpl<TUserRoleMapper, TUserRole> implements ITUserRoleService {

    @Autowired
    TUserRoleMapper tUserRoleMapper;
    @Override
    public List<TUserRole> getById(Integer id) {
        QueryWrapper<TUserRole> queryWrapper=new QueryWrapper<TUserRole>();
        queryWrapper.eq("userId", id);
        return tUserRoleMapper.selectList(queryWrapper);
    }
}
